Rui Matos [Thu, 26 Feb 2015 18:21:52 +0000 (19:21 +0100)]
viewSelector: Don't reset the search entry if it has preedit text
If users click outside the search entry while it's empty we reset and
thus give up key focus. This means that when using an input method
with candidate popups, interacting with the popup with a mouse click
cancels the current input method context if there's no other text in
the entry besides the preedit string.
To avoid this we can check if the entry has preedit in addition to
checking if it has normal text.
Florian Müllner [Tue, 3 Mar 2015 22:22:02 +0000 (23:22 +0100)]
dateMenu: Set label_actor for WorldClock button
Ideally we would allow navigating into the button in the screen
reader case, so the configured clocks are read out properly.
However we can still do better than nothing short-term by pointing
to the section header as the button's label_actor.
Florian Müllner [Wed, 25 Feb 2015 23:26:13 +0000 (00:26 +0100)]
calendar: Update notification timestamps/positions on updates
Currently both the timestamp and the position in the notification list
are static once a notification has been added; however notifications may
be updated later, in which case those properties should be reevaluated.
Florian Müllner [Wed, 25 Feb 2015 22:23:49 +0000 (23:23 +0100)]
util: Add createTimeLabel()
On locales that support it, time formats should follow the 12-hour/24-hour
preference, which implies that they should be updated when the setting
changes. So add another utility method which creates a label for a specific
time and keeps it in sync with the format setting.
Florian Müllner [Wed, 25 Feb 2015 19:25:04 +0000 (20:25 +0100)]
util: Use GLib.DateTime in formatTime()
The world clock uses GLib.DateTime instead of the built-in Date type
because of the much superior timezone support, and therefore cannot
use the new formatTime() helper. To make this possible, modify the
method to support a parameter of either type.
Florian Müllner [Wed, 25 Feb 2015 19:27:02 +0000 (20:27 +0100)]
Use formatTime() for timestamps
Replace the time formatting in notifications and events with the
new utility method - this makes sure that all times are now following
the clock-format setting and use LC_TIME.
Florian Müllner [Wed, 25 Feb 2015 15:43:59 +0000 (16:43 +0100)]
util: Add formatTime() helper method
Displaying a time is more complex than it appears at first glance:
it should respect the user's choice regarding 12- our 24-hour format (but
only when supported by the locale) and follow the LC_TIME rather than the
LC_MESSAGES setting.
So rather than getting it more or less right in various places, it makes
sense to defer to a helper method which hopefully does the right thing. The
method added by this patch is based on _formatTimestamp in telepathyClient
with some minor tweaks:
- there's an additional params parameter which allows enforcing
a time-only format, even on dates other than the current one
- only a single desktop settings object is created and shared between
invocations
Florian Müllner [Wed, 4 Mar 2015 09:29:22 +0000 (10:29 +0100)]
appDisplay: Disable scrolling during animations
Currently scroll events during the swarm animation will make the
grid appear immediately in addition to the animating clones, and
there'll be a mismatch with the icon at the target position. This
badly breaks the illusion of launchers emerging from the dash and
positioning themselves in a grid - as scrolling icons "mid-air"
before they form a paginated grid doesn't make much sense anyway,
fix this issue by ignoring scroll events for the duration of the
animation.
TelepathyClient: remove account status notifications
These notifications are annoying for the most part: presence
changes happen inside an app (empathy or polari), and that app
should have in app notifications for errors, instead of spamming
the global notifications.
workspace: Prevent overlapping windows when scaling to fit the screen
The previous code was applying the per row scaling factor of the current
row to the cumulative sum of all previous rows when calculating the y
position of a row. This resulted in the row being shifted up so it would
overlap other windows when the previous rows were not using the same
scaling as the current one.
Also the previous code was not considering that the spacing does not get
scaled when calculating the scaling factor. This is wrong as well and
could result in the overview overlapping the workspace switcher in
situations with lots of windows open.
This fix gives each row the appropriate height according to its scaling
factor and then ensures that the grid remains vertically centered after
losing some of its height.
Florian Müllner [Fri, 27 Feb 2015 18:34:45 +0000 (19:34 +0100)]
runDialog: Disable restart command on wayland
Clients can be expected to deal with the WM going away temporarily,
but not the display server - so when running as wayland compositor,
a restart is generally a fancy way of killing the user session, and
there's little we can do about it except for preventing the user to
shoot herself in the foot by throwing an error.
Florian Müllner [Tue, 3 Mar 2015 03:37:49 +0000 (04:37 +0100)]
calendar: Allow keynav to day headers and week numbers
While those elements cannot be activated, they still provide useful
information to screen readers, so include them in the focus chain.
For the same purpose, set a more verbose accessible name, given that
it is not bound by the same space constraints as the visible label.
Florian Müllner [Tue, 3 Mar 2015 01:04:37 +0000 (02:04 +0100)]
calendar: Respect session mode for section visibility
It doesn't make much sense to show a section if it must remain empty
due to the session mode - there won't be any events if the session
mode disallows events, or notifications if those are disallowed. So
take the session mode into account and update the sections' visibility
accordingly.
Florian Müllner [Tue, 3 Mar 2015 00:27:43 +0000 (01:27 +0100)]
dateMenu: Hide displays section when disabled by session mode
We currently show the world clocks section unconditionally, even when
the session mode disallows launching the Clocks app to configure the
displayed clocks. This does not make sense, so hide the entire section
when the session mode disallows settings.
Florian Müllner [Thu, 26 Feb 2015 15:52:12 +0000 (16:52 +0100)]
legacyTray: Add a hideable tray for legacy status icons
Commit 5a8923ef95a2 removed support for legacy status icons from
the notification system, as we no longer want them to appear as
notifications. As we are unfortunately not quite at a point where
we can remove all support for them for good, so we now need an
alternative place to put them. Add a small dedicated tray at the
bottom which appears when any legacy status icons are active. By
default it is almost completely hidden to not interfere with the
user's windows, but can be expanded on demand to interact with
the icons.
Florian Müllner [Tue, 3 Mar 2015 14:03:35 +0000 (15:03 +0100)]
util: Filter out message context of untranslated strings
Commit 5a47ad837b changed the definition of NC_() to include the
message context, so that gettext can correctly disambiguate strings
like "S". However this does only work when gettext actually returns
a translation from the catalogue; if the string is not found, we
need to strip the context again to not have it show up in the UI.
polari is the GNOME app for IRC, empathy is for everything else
So prefer polari to empathy for IRC channels. We don't need
to check that either exists (even though polari is not a core
app) because mission control tries every handler if the preferred
one fails.
Depends on bug 745418 for polari to be mission control activatable.
Make sure the message list section is set to the current date
when opening the menu, otherwise the calendar might skip
the selected-date-changed event (because the day did not change)
which would leave the message list with an uninitialized date.
Rui Matos [Thu, 26 Feb 2015 16:47:37 +0000 (17:47 +0100)]
Revert "workspace: Grab the key focus when hovering over a window"
Turns out this makes interaction with the OSK or candidate popups
using a mouse basically impossible since they get dismissed when the
key focus is captured by a window in the overview.
Florian Müllner [Fri, 27 Feb 2015 14:10:11 +0000 (15:10 +0100)]
calendar: Allow to dismiss messages with delete
Messages can be dismissed using a pointer device by clicking the
close button, there's no reason to not make the same action
available via keyboard as well. Delete looks like an obvious
choice ...
Florian Müllner [Wed, 25 Feb 2015 15:42:47 +0000 (16:42 +0100)]
data: Change default shortcut for opening the message list
With the message tray no longer being a distinctive UI element,
the existing <super>m shortcut for viewing the notification list
is no longer mnemonic. It is also less convenient as it requires
both hands with most keyboards. So make <super>v the new default
to _view_ notifications, which matches the corresponding Windows
default.
The previous default is kept as secondary shortcut to ease the
transition.
Florian Müllner [Fri, 27 Feb 2015 01:09:02 +0000 (02:09 +0100)]
dash: Fix leaking signal connections
The overview has a longer life-time than dash items, so we are
leaking a signal connection each time an item is destroyed.
Spotted by Michele (<micxgx@gmail.com>)
Florian Müllner [Sat, 21 Feb 2015 08:05:58 +0000 (09:05 +0100)]
messageTray: Hide from picks during DND operations
As it is impossible to interact with notification banners while a DND
operation is ongoing, we can temporarily hide the banner container from
picks so that DND works as expected even while a banner is showing.
Florian Müllner [Wed, 25 Feb 2015 16:43:54 +0000 (17:43 +0100)]
messageTray: Take over trayBox from LayoutManager
Since commit e189a34, the trayBox uses a Contraint to cover the primary
monitor's work area. This allows banners to be clipped so they don't
leak into monitors above the primary one during animations. However even
without being reactive, the trayBox now interferes with operations like
Looking Glass' object picker and overview DND.
With the trayBox no longer being positioned manually, there's no strong
reason to keep it in LayoutManager, and handling it in MessageTray allows
to hide the actor while no banner is showing, which helps with the issue
outlined above.
Florian Müllner [Wed, 25 Feb 2015 17:08:53 +0000 (18:08 +0100)]
messageTray: Fix actor visibility
The actor is supposed to be hidden while no notification banner
is displayed, and in addition to that when banners are temporarily
blocked (because the calendar is open). However the current code
always shows the actor when banners are not blocked, fix that.
Florian Müllner [Thu, 26 Feb 2015 22:31:46 +0000 (23:31 +0100)]
screenShield: Do not wake up screen after adding hidden source
The screen should be woken up when a new notification is shown on
the lock screen, but not when a notification arrives while disabled.
Add a missing condition to fix.
David Liang [Thu, 26 Feb 2015 20:40:56 +0000 (15:40 -0500)]
gdm: prevent nextSignalId from being connected multiply times
The problem is caused by '_askForUsernameAndBeginVerification' being
called multiply times. So when we click 'next', the old connected
function will also be executed.
Florian Müllner [Thu, 26 Feb 2015 00:05:29 +0000 (01:05 +0100)]
Drop MESSAGE_TRAY action mode
The mode is never set after the removal of the bottom tray, so it
no longer makes sense to pass it to allowKeybinding(). We can also
safely remove it from the ActionModes flags altogether without
requiring a synchronized update with gnome-settings-daemon, as
the latter never used any flag value above LOGIN_SCREEN.